import request from '@/utils/request'

const prefixUrl = '/service-creditcard/airui/api/creditcard'
//获取信用卡列表
export const GetCreditCardList = () => {
  return request({
    url: prefixUrl + '/creditCard',
    method: 'get',
  })
}
//刷新验证码
export const RefreshTheCreditCode = () => {
  return request({
    url: prefixUrl + '/common/getCode',
    method: 'get',
  })
}
//提交我的申请信息
export const SubmitTheMsg = data => {
  return request({
    url: prefixUrl + '/verify',
    method: 'post',
    data,
  })
}
//获取我的信用卡申请信息
export const GetMyExamineCredit = () => {
  return request({
    url: prefixUrl + '/myExamine',
    method: 'get',
  })
}
//根据卡号获取银行卡信息
export const GetBankCardByCardNum = cardNum => {
  return request({
    url: prefixUrl + '/findBankCardByCardNum?cardNum=' + cardNum,
    method: 'get',
  })
}
//提现操作
export const BorrowMoney = data => {
  return request({
    url: prefixUrl + '/borrowMoney',
    method: 'post',
    data,
  })
}
//还款
export const ReBackMoney = data => {
  return request({
    url: prefixUrl + '/reBackMoney',
    method: 'post',
    data,
  })
}
